package com.appsino.bingluo.secret.Utils;

import android.os.Bundle;
import android.util.Log;
import android.widget.VideoView;

import com.appsino.bingluo.secret.R;
import com.appsino.bingluo.secret.app.BaseActivity;

import butterknife.BindView;

public class VideoViewActivity extends BaseActivity {
    @BindView(R.id.vv_video)
    VideoView vvVideo;

    @Override
    public int getViewId() {
        return R.layout.activity_video;
    }

    @Override
    public void init(Bundle savedInstanceState) {
        try {
            String url="http://39.100.144.69:8080/sys/videoView";
            vvVideo.setVideoPath(url);
            vvVideo.requestFocus();
            vvVideo.start();
        } catch (Exception e) {
            Log.i("tag","============videoe"+e);
            e.printStackTrace();
        }
//        try {
//            Uri uri = Uri.parse("android.resource://" + getPackageName() + "/raw/" + );
//            vvVideo.setVideoURI(uri);
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
    }
}
